﻿__author__ = 'Administrator'

def http_wraper():
    import httplib2
    h = httplib2.Http('.cache')
    # resp,content = h.request('http://www.51zhangdan.com/service/user/mobile_login.ashx?mobile=18959422559&password=huang3488&mobile_code=&uuid=&app_id=0&openudid=&macid=&devicename=null&device_name=null&platform=null&version=null&width=null&height=null&colordepth=null&device_token=null&jv=5.20&user_id=0&token=&_=1399449087326')
    # print(content)
    import json
    obj = {'a':3,'b':4,'c':'five'}
    sobj = json.dumps(obj)
    print(sobj)
    obj1 = json.loads(sobj)
    print(obj1)
    print(obj)
    sobj1 = '{"b": 4, "c": "five", "a": 3}';

    import urllib
    data = dict(name="joe",comment="fuck")
    e = urllib.parse.urlencode(data)

if __name__ == "__main__":
    http_wraper()
